package com.fivestar.finance.app.bean.resp;

import android.os.Parcel;
import android.os.Parcelable;

import com.fivestar.finance.app.bean.Address;

import java.io.Serializable;
import java.util.List;

/**
 * 订单详情
 *
 * @author Derek.Kidd
 * @version V1.0.0
 * @date 2016/5/16 13:52
 */
public class OrderDetailResp implements Serializable, Parcelable {

    String orderId;// 订单ID
    String jobId;//用车任务ID
    String orderAcceptUser;//接受订单的司机
    double driverScore;//用户评分
    int orderType;//订单类型  1长期、2单次
    List<Address> orderDestination;// 订单目的地
    Double costMoney;// 扣费金额
    int orderState;// 订单状态
    String createTime;// 创建时间
    String diverMobile;//司机电话
    String useCarTime;//用车时间
    String carTypeName;//车型，车型名称
    String jobCondition;//任务附加条件(REC:回单，CAR：搬运，PAY：回款)
    String words;//备注，给司机捎句话
    String billMoney;//小费价格
    int costType;//扣费方式

    double param1;//按里程计费:起步公里数
    double param2;//按里程计费:起步公里数价格
    double param3;//按里程计费:超公里数
    double param4;//按里程计费:超公里数价格
    double param5;//按趟计费：每趟配送货物运费
    double param6;//货价计费：整车货物价格
    double param7;//货价计费：运费比例
    double param8;//按数量计费：整车货物件数
    double param9;//按数量计费：每件运费

    boolean overOrder;//是否可以取消订单


    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    public String getOrderAcceptUser() {
        return orderAcceptUser;
    }

    public void setOrderAcceptUser(String orderAcceptUser) {
        this.orderAcceptUser = orderAcceptUser;
    }

    public double getDriverScore() {
        return driverScore;
    }

    public void setDriverScore(double driverScore) {
        this.driverScore = driverScore;
    }

    public int getOrderType() {
        return orderType;
    }

    public void setOrderType(int orderType) {
        this.orderType = orderType;
    }

    public List<Address> getOrderDestination() {
        return orderDestination;
    }

    public void setOrderDestination(List<Address> orderDestination) {
        this.orderDestination = orderDestination;
    }

    public Double getCostMoney() {
        return costMoney;
    }

    public void setCostMoney(Double costMoney) {
        this.costMoney = costMoney;
    }

    public int getOrderState() {
        return orderState;
    }

    public void setOrderState(int orderState) {
        this.orderState = orderState;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public boolean isOverOrder() {
        return overOrder;
    }

    public void setOverOrder(boolean overOrder) {
        this.overOrder = overOrder;
    }

    public String getDiverMobile() {
        return diverMobile;
    }

    public void setDiverMobile(String diverMobile) {
        this.diverMobile = diverMobile;
    }

    public String getUseCarTime() {
        return useCarTime;
    }

    public void setUseCarTime(String useCarTime) {
        this.useCarTime = useCarTime;
    }

    public String getCarTypeName() {
        return carTypeName;
    }

    public void setCarTypeName(String carTypeName) {
        this.carTypeName = carTypeName;
    }

    public String getJobCondition() {
        return jobCondition;
    }

    public void setJobCondition(String jobCondition) {
        this.jobCondition = jobCondition;
    }

    public String getWords() {
        return words;
    }

    public void setWords(String words) {
        this.words = words;
    }

    public String getBillMoney() {
        return billMoney;
    }

    public void setBillMoney(String billMoney) {
        this.billMoney = billMoney;
    }

    public int getCostType() {
        return costType;
    }

    public void setCostType(int costType) {
        this.costType = costType;
    }

    public double getParam1() {
        return param1;
    }

    public void setParam1(double param1) {
        this.param1 = param1;
    }

    public double getParam2() {
        return param2;
    }

    public void setParam2(double param2) {
        this.param2 = param2;
    }

    public double getParam3() {
        return param3;
    }

    public void setParam3(double param3) {
        this.param3 = param3;
    }

    public double getParam4() {
        return param4;
    }

    public void setParam4(double param4) {
        this.param4 = param4;
    }

    public double getParam5() {
        return param5;
    }

    public void setParam5(double param5) {
        this.param5 = param5;
    }

    public double getParam6() {
        return param6;
    }

    public void setParam6(double param6) {
        this.param6 = param6;
    }

    public double getParam7() {
        return param7;
    }

    public void setParam7(double param7) {
        this.param7 = param7;
    }

    public double getParam8() {
        return param8;
    }

    public void setParam8(double param8) {
        this.param8 = param8;
    }

    public double getParam9() {
        return param9;
    }

    public void setParam9(double param9) {
        this.param9 = param9;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.orderId);
        dest.writeString(this.jobId);
        dest.writeString(this.orderAcceptUser);
        dest.writeDouble(this.driverScore);
        dest.writeInt(this.orderType);
        dest.writeTypedList(this.orderDestination);
        dest.writeValue(this.costMoney);
        dest.writeInt(this.orderState);
        dest.writeString(this.createTime);
        dest.writeByte(this.overOrder ? (byte) 1 : (byte) 0);
        dest.writeString(this.diverMobile);
        dest.writeString(this.useCarTime);
        dest.writeString(this.carTypeName);
        dest.writeString(this.jobCondition);
        dest.writeString(this.words);
        dest.writeString(this.billMoney);
        dest.writeInt(this.costType);
        dest.writeDouble(this.param1);
        dest.writeDouble(this.param2);
        dest.writeDouble(this.param3);
        dest.writeDouble(this.param4);
        dest.writeDouble(this.param5);
        dest.writeDouble(this.param6);
        dest.writeDouble(this.param7);
        dest.writeDouble(this.param8);
        dest.writeDouble(this.param9);
        dest.writeByte(this.overOrder ? (byte) 1 : (byte) 0);
    }

    public OrderDetailResp() {
    }

    protected OrderDetailResp(Parcel in) {
        this.orderId = in.readString();
        this.jobId = in.readString();
        this.orderAcceptUser = in.readString();
        this.driverScore = in.readDouble();
        this.orderType = in.readInt();
        this.orderDestination = in.createTypedArrayList(Address.CREATOR);
        this.costMoney = (Double) in.readValue(Double.class.getClassLoader());
        this.orderState = in.readInt();
        this.createTime = in.readString();
        this.overOrder = in.readByte() != 0;
        this.diverMobile = in.readString();
        this.useCarTime = in.readString();
        this.carTypeName = in.readString();
        this.jobCondition = in.readString();
        this.words = in.readString();
        this.billMoney = in.readString();
        this.costType = in.readInt();
        this.param1 = in.readDouble();
        this.param2 = in.readDouble();
        this.param3 = in.readDouble();
        this.param4 = in.readDouble();
        this.param5 = in.readDouble();
        this.param6 = in.readDouble();
        this.param7 = in.readDouble();
        this.param8 = in.readDouble();
        this.param9 = in.readDouble();
        this.overOrder = in.readByte() != 0;
    }

    public static final Creator<OrderDetailResp> CREATOR = new Creator<OrderDetailResp>() {
        @Override
        public OrderDetailResp createFromParcel(Parcel source) {
            return new OrderDetailResp(source);
        }

        @Override
        public OrderDetailResp[] newArray(int size) {
            return new OrderDetailResp[size];
        }
    };
}
